<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    Activity
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @license    http://www.socialengine.com/license/
 * @version    $Id: Controller.php 9806 2012-10-30 23:54:12Z matthew $
 * @author     John
 */

/**
 * @category   Application_Core
 * @package    Activity
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @license    http://www.socialengine.com/license/
 */
class Country_Widget_ListFieldsController extends Engine_Content_Widget_Abstract
{
  public function indexAction()
  {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     
     $id = $request->getParam('id');
     $this->view->error = false;
     $cid = $request->getParam('cid');
     $this->view->country_id = $cid;
     if (empty($id)) {
        $this->view->error = true;
        $this->view->message = "Field not found.";
        return;
     }
     
     $fieldObject = Engine_Api::_()->getItem('country_field',$id);
     if (!$fieldObject){
        $this->view->error = true;
        $this->view->message = "Field not found.";
        return;
     }
     $this->view->fieldObject = $fieldObject;
        
     $fieldT = Engine_Api::_()->getDbtable('Countryfields','country');
     $fields = $fieldT->getListFieldPage($id);
     $this->view->fields = $fields;
     
     
  
 
  }
}
